Skip to main content

organization

Table: organization

The organization table stores details of organizations associated with the system.
It tracks creation, updates, and soft-deletion (voiding) of each organization.


Columns

Column NameData TypeConstraintsDescription
organizationIdint(11)NOT NULL, PRIMARY KEYUnique identifier for the organization
createdDatedatetimeNULLTimestamp when the organization record was created
dateRegistereddatetimeNULLOfficial registration date of the organization
lastEditedDatedatetimeNULLTimestamp when the organization record was last updated
organizationNamevarchar(100)NULLName of the organization
voidedtinyint(1)NULLFlag indicating if the record is voided (1 = voided, 0 = active)
voidedDatedatetimeNULLTimestamp when the record was voided
voidedReasonvarchar(50)NULLReason for voiding the record
createdByUserIdint(11)NULLID of the user who created the record (references user.mappedId)
lastEditedByUserIdint(11)NULLID of the user who last edited the record (references user.mappedId)

Indexes

  1. PRIMARY - Primary key on organizationId
  2. organization_lastEditedByUserId_user_mappedId_FK - Index on lastEditedByUserId
  3. organization_createdByUserId_user_mappedId_FK - Index on createdByUserId

Foreign Key Relations

  1. organization_createdByUserId_user_mappedId_FKuser.mappedId

    • Links the organization record to the user who created it
  2. organization_lastEditedByUserId_user_mappedId_FKuser.mappedId

    • Links the organization record to the user who last edited it

Usage Notes

  • Maintains organization information including registration and audit details.
  • voided and voidedReason allow soft deletion of records without permanent removal.
  • Indexed for efficient lookup by creator or last editor of the organization.